﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Diagnostics;

namespace Microsoft.MSE.Catalog.Contracts
{
    [MessageContract()]
    public class AcceptEventMsg
    {
        [MessageBodyMember(Namespace = SC.WSENamespaceURI)]
        public DBEventContext AcceptEvent;

        public AcceptEventMsg()
        {
        }

        public AcceptEventMsg(DBEventContext AcceptEvent)
        {
            this.AcceptEvent = AcceptEvent;
        }
    }

    [MessageContract(IsWrapped = false)]
    public class SubscribeRequestMsg
    {

        [MessageBodyMember(Namespace = SC.MSEEventingNamespaceURI)]
        public Subscribe Subscribe;

        public SubscribeRequestMsg()
        {
        }

        public SubscribeRequestMsg(Subscribe request)
        {
            this.Subscribe = request;
        }
    }

    [MessageContract]
    public class SubscribeResponseMsg
    {

        [MessageBodyMember(Namespace = SC.MSEEventingNamespaceURI)]
        public SubscribeResponse SubscribeResponse;

        public SubscribeResponseMsg()
        {
        }

        public SubscribeResponseMsg(SubscribeResponse response)
        {
            this.SubscribeResponse = response;
        }
    }




    [MessageContract]
    public class EventSourceNotificationMsg
    {
        [MessageHeader(MustUnderstand = true, Namespace = SC.MSEEventingNamespaceURI)]
        public string referenceParameters;
        [MessageBodyMember(Namespace = SC.Namespace)]
        public string notification;

    }

    [MessageContract]
    public class RenewRequestMsg
    {

        [MessageHeader(MustUnderstand = true, Namespace = SC.MSEEventingNamespaceURI)]
        public string ReferenceParameters;

        [MessageBodyMember(Namespace = SC.MSEEventingNamespaceURI, Order = 0)]
        public Renew Renew;
            
        public RenewRequestMsg()
        {
        }

        public RenewRequestMsg(Renew request)
        {
            this.Renew = request;
        }
    }

    [DebuggerStepThrough()]
    [MessageContract]
    public class RenewResponseMsg
    {

        [MessageBodyMember(Namespace = SC.MSEEventingNamespaceURI, Order = 0)]
        public RenewResponse RenewResponse;

        public RenewResponseMsg()
        {
        }

        public RenewResponseMsg(RenewResponse response)
        {
            this.RenewResponse = response;
        }
    }

    [DebuggerStepThrough()]
    [MessageContract]
    public class UnsubscribeRequestMsg
    {

        [MessageHeader(MustUnderstand = true, Namespace = SC.MSEEventingNamespaceURI)]
        public string ReferenceParameters;

        [MessageBodyMember(Namespace = SC.MSEEventingNamespaceURI, Order = 0)]
        public Unsubscribe Unsubscribe;

        public UnsubscribeRequestMsg()
        {
        }

        public UnsubscribeRequestMsg(Unsubscribe request)
        {
            this.Unsubscribe = request;
        }
    }

    [DebuggerStepThrough()]
    [MessageContract]
    public class GetStatusRequestMsg
    {

        [MessageHeader(MustUnderstand = true, Namespace = SC.MSEEventingNamespaceURI)]
        public string ReferenceParameters;

        [MessageBodyMember(Namespace = SC.MSEEventingNamespaceURI, Order = 0)]
        public GetStatus GetStatus;

        public GetStatusRequestMsg()
        {
        }

        public GetStatusRequestMsg(GetStatus request)
        {
            this.GetStatus = request;
        }
    }

    [DebuggerStepThrough()]
    [MessageContract]
    public class GetStatusResponseMsg
    {

        [MessageBodyMember(Namespace = SC.MSEEventingNamespaceURI, Order = 0)]
        public GetStatusResponse GetStatusResponse;

        public GetStatusResponseMsg()
        {
        }

        public GetStatusResponseMsg(GetStatusResponse response)
        {
            this.GetStatusResponse = response;
        }
    }
}
